/*
 * Copyright (C) 2016 Facishare Technology Co., Ltd. All Rights Reserved.
 */
package com.wlh.animation.ipctest;

import android.os.Bundle;
import android.os.RemoteException;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

/**
 * @author weilh
 *         <b>DATE</b> 2016/8/25.
 */
public class BinderPoolTestAct extends AppCompatActivity{

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void onStart() {
        super.onStart();
    }

    @Override
    protected void onResume() {
        super.onResume();
//        new Thread() {
//            @Override
//            public void run() {
//                super.run();
                IBookManager bookManager = BinderPoolService.BookManagerImpl.asInterface(BinderPool.getInstance
                        (BinderPoolTestAct.this).queryBinder
                        (BinderPool.BINDER_BOOK));
                ITopicManager topicManager = BinderPoolService.TopicManagerImpl.asInterface(BinderPool.getInstance
                        (BinderPoolTestAct.this).queryBinder
                        (BinderPool.BINDER_TOPIC));
                try {
                    bookManager.getBookList();
                    topicManager.updateTopic();
                } catch (RemoteException e) {
                    e.printStackTrace();
                }
//            }
//        }.start();
    }
}
